﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Zhj.Community.Application.Test;

namespace Zhj.Community.WebApp.Controllers
{
    public class TestController : Controller
    {
        public ITestApp TestApp { get; set; }

        public TestController(ITestApp testApp)
        {
            TestApp = testApp;
        }


        public ActionResult Index()
        {
            var list = TestApp.GetStduentList();
            ViewData["list"] = list;
            return View();
        }

        public ActionResult Edit(long id)
        {
            var student = TestApp.GetStduentById(id);
            ViewData["student"] = student;
            return View();
        }
        
    }
}